package com.shijie.sjoj.model.pojo.entity;

import com.shijie.sjoj.model.base.BasePojo;
import com.shijie.sjoj.model.pojo.base.Gender;
import com.shijie.sjoj.model.pojo.base.Role;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 用户实体类
 *
 * @author ZSJ
 */
@Data
@Builder
public class User implements BasePojo {

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 用户名
     */
    private String username;

    /**
     * 账号
     */
    private String account;

    /**
     * 密码
     */
    private String password;

    /**
     * 角色
     */
    private Role role;

    /**
     * 手机号
     */
    private String phone;

    /**
     * 注册时间
     */
    private LocalDateTime registerTime;

    /**
     * 性别
     */
    private Gender gender;

    /**
     * 头像路径
     */
    private String avatar;

    /**
     * 生日
     */
    private LocalDate birthday;

    /**
     * 城市，例：江西 九江市（普通省市）/上海市（直辖市）
     */
    private String city;

    /**
     * 个人介绍
     */
    private String introduction;

    public User() {
        this.userId = null;
        this.username = null;
        this.account = null;
        this.password = null;
        this.role = null;
        this.phone = null;
        this.registerTime = null;
        this.gender = null;
        this.avatar = null;
        this.birthday = null;
        this.city = null;
        this.introduction = null;
    }

    public User(Long userId, String username, String account, String password, Role role, String phone, LocalDateTime registerTime,
                Gender gender, String avatar, LocalDate birthday, String city, String introduction) {
        this.userId = userId;
        this.username = username;
        this.account = account;
        this.password = password;
        this.role = role;
        this.phone = phone;
        this.registerTime = registerTime;
        this.gender = gender;
        this.avatar = avatar;
        this.birthday = birthday;
        this.city = city;
        this.introduction = introduction;
    }


}
